package jdkProxy;

import java.lang.reflect.Proxy;
import java.util.logging.Handler;

public class Main {
    public static void main(String[] args) {
        UserService userService=new UserServiceImpl();
        MyProxyHandler Handler=new MyProxyHandler(userService);


        UserService proxyObject=(UserService) Proxy.newProxyInstance(
                UserService.class.getClassLoader(),
                new Class<?>[]{UserService.class},
                Handler
        );
        proxyObject.getUserByID();
    }
}
